<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@page import="java.util.Enumeration"%>
<%
    String url = request.getParameter("url");
	System.out.println(url);
	session.setAttribute("url", url);
    session.removeAttribute("url")
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">



<body>
    
    <span>附件：</span><span id="_file"><input type="file" id="" value="c:\aa.aa" /></span><input type="button" value="" onclick="addFile();" />
    <form id="appendix_form" action="./multipartformdata_handler.jsp" enctype="multipart/form-data" method="post">
        
    </form>
    <input type="button" value="增加" onclick="addFile();" />
    <input type="button" value="提交" onclick="$E('appendix_form').submit();" />
</body>

<script type="text/javascript">
<!--
eval("var o = {a: 1, b: 2};")
alert(o.a);

function $E(id) {
    return document.getElementById(id);
}

function addFile() {
    var form = $E("appendix_form");
    var file = document.createElement("INPUT");
    var ps = [];
    for (var p in file) {
        ps[ps.length] = p + "--" + typeof p;
    }
    alert(ps);
    file.type = "file";
    file.id = "pic";
    file.name = "pic";
    form.appendChild(file);
    alert(form.innerHTML);
}

function setValue() {
    $E("form").submit();
}
//-->
</script>
    
</html>